|
|
I use this function in radiosit.cpp:
/***************************************************************************
**
*
* FUNCTION VGet() - Gets 2dimensional src_vec, converts it with
* z=sqrt(1-x*x-y*y) into 3dimensional dest_vec.
*
* INPUT
*
* OUTPUT
*
* RETURNS Nothing
*
* AUTHOUR Eli Jehoel
*
* DESCRIPTION
*
* The radiosity rays have been precomputed. For each sample, dz is derived
* from dx and dy. Ranges of dx and dy are (-1. to 1.), range of dz is
* (0. to 1.)
*
* There is no VNormalizing involved in this function in order to gain
speed.
*
* CHANGES
*
* --- Jan 2002 : Creation.
*
****************************************************************************
**/
static void VGet(VECTOR dest_vec, DOUBLE_XY * src_vec)
{
dest_vec[X] = src_vec->x;
dest_vec[Y] = src_vec->y;
dest_vec[Z] = sqrt(1. - pow(src_vec->x, 2.)-pow(src_vec->x, 2.));
}
Post a reply to this message
|
|